package com.chuck.learning.mains;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main2 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){

            int num = sc.nextInt();
            List<Integer> set = new ArrayList<>();
            for(int i = 0 ; i < num ;i++){
                int curr = sc.nextInt();
                if (set.contains(curr)) {
                    continue;
                }
                set.add(curr);
            }
            set.sort((a,b)->{
                return b.compareTo(a);
            });
            for(Integer i : set){
                System.out.println(i);
            }
        }
    }

}